import QtQuick 2.12
import QtQuick.Controls 2.12
import org.ukui.qqc2style.private 1.0 as StylePrivater

Menu {
    id: menu
    Accessible.name: "kylin-ai-memorymap_Menu_context"
    property var backOpacity: 0.0
    modal: false
    onActiveFocusChanged: {
        if (!activeFocus) {
            menu.close()
        }
    }//    function openAboutPage() {
    //        aboutPageVisible = true
    //    }
    //    function openSettingsPage() {

    //        settingsPageVisible = true
    //    }
    //    function openHelpPage() {
    //       VideoInfo.showGuide()
    //    }

//    function openAboutPage() {
//        aboutPageVisible = true
//    }
//    function openSettingsPage() {

//        settingsPageVisible = true
//    }
//    function openHelpPage() {
//       VideoInfo.showGuide()
//    }

    Action { text: qsTr("Settings123"); Accessible.name: "kylin-ai-memorymap_Action_settings" }
    Action { text: qsTr("Help"); Accessible.name: "kylin-ai-memorymap_Action_help" }
    Action { text: qsTr("About"); Accessible.name: "kylin-ai-memorymap_Action_about" }
    Action { text: qsTr("Exit"); Accessible.name: "kylin-ai-memorymap_Action_exit" }

    delegate: MenuItem {
        id: menuItem
        implicitWidth: 122
        leftPadding: 20

        onPressed: {
//            if (text === qsTr("Exit")) {
//                showCloseBtnPopUp()
//            }
//            if (text === qsTr("About")) {
//                openAboutPage()
//            }
//            if (text === qsTr("Settings")) {
//                openSettingsPage()
//            }
//            if (text === qsTr("Help")) {
//                openHelpPage()
//            }
        }
    }
}
